/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cardamy.core.card.attr;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;

/**
 *
 * @author Santiago
 */
public class CardAttributeHolder {
    
    
    protected HashMap<String, ICardAttribute> _holder = new HashMap<>();
    
    public CardAttributeHolder addAttr(ICardAttribute attr) {
        _holder.put(attr.getKey(), attr);
        return this;
    }
    
    public Iterator<Entry<String, ICardAttribute>> iterator() {
        return _holder.entrySet().iterator();
    }
    
    public ICardAttribute getAttr(String key) {
        return _holder.get(key);
    }
    
}
